<?php

namespace shopend\assets;

use common\service\GlobalUrlService;
use yii\web\AssetBundle;

class ShopAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [];
    public $js = [];

    public function registerAssetFiles($view){
//        $release_version = defined("RELEASE_VERSION") ? RELEASE_VERSION : time();
        // 这里注册公共的样式
        $this->css = [
            GlobalUrlService::buildShopUrl('/css/layui.css'),
            GlobalUrlService::buildShopUrl('/css/public.css'),
        ];
        // 这里注册公共的js都在这里书写.
        $this->js = [
            GlobalUrlService::buildShopUrl('/backend/qiniu.min.js'),
            GlobalUrlService::buildShopUrl('/js/layui.js'),
            GlobalUrlService::buildShopUrl('/backend/common.js'),
        ];
        parent::registerAssetFiles($view);
    }
}